import { FC } from 'react'
import { Button, styled } from '@mui/material'
import { useNavigate } from 'react-router-dom'

const StyledButton = styled(Button)(() => ({
	textTransform: 'none',
	width: 'fit-content',
	color: '#7B8E98',
	fontFamily: 'Nunito',
	fontSize: '14px',
	border: '0',
}))

export const GoBackButton: FC = () => {
	const navigate = useNavigate()

	function handleClick() {
		navigate(-1)
	}

	return <>{<StyledButton onClick={handleClick}>{'< Нaзад'}</StyledButton>}</>
}
